package pojo;


import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

public class User {
    private Integer userId;
    private String userName;
    private String telephone;
    private String password;
    private String realName;
    private String userRole;
    private Date lastLogin;
    private Integer loginCount;
    private Date createTime;

    // Getters and Setters
    // 假设有 status 字段
    private String status;
    // 添加 set 方法
    public void setStatus(String status) {
        this.status = status;
    }
    // 若需要，也可添加 get 方法
    public String getStatus() {
        return status;}
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer user_id) {
        this.userId = user_id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String user_name) {
        this.userName = user_name;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String real_name) {
        this.realName = real_name;
    }

    public String getUserRole() {
        return userRole;
    }

    public void setUserRole(String user_role) {
        this.userRole = user_role;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getLastLogin() {
        return lastLogin;
    }

    public void setLastLogin(Date last_login) {
        this.lastLogin = last_login;
    }

    public Integer getLoginCount() {
        return loginCount;
    }

    public void setLoginCount(Integer login_count) {
        this.loginCount = login_count;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date create_time) {
        this.createTime = create_time;
    }

    @Override
    public String toString() {
        return "User{" +
                "user_id=" + userId +
                ", user_name='" + userName + '\'' +
                ", telephone='" + telephone + '\'' +
                ", password='" + password + '\'' +
                ", real_name='" + realName + '\'' +
                ", user_role='" + userRole + '\'' +
                ", last_login=" + lastLogin +
                ", login_count=" + loginCount +
                ", create_time=" + createTime +
                '}';
    }
}